04 / 05

How would you build a hybrid search query that retrieves candidates from both a dense embedding and a BM25-style sparse vector, then fuses the results?

Use two prefetch branches and fuse their candidate lists with RRF

I would model the collection with a named dense vector and a named sparse vector, generate both query representations, retrieve a candidate set from each using prefetch, and then apply a fusion query such as Reciprocal Rank Fusion. RRF is a good starting point because dense and sparse scores do not necessarily share the same numerical scale. The important design decision is candidate depth: each branch should retrieve enough candidates that relevant documents are unlikely to disappear before fusion, while not making the first-stage search unnecessarily expensive. I would then measure recall, latency, and fusion quality offline before tuning limits. A common mistake is multiplying or directly adding raw dense and sparse scores without calibration. The exact Universal Query API and client syntax is version-sensitive, so production code should match the installed Qdrant SDK/server release.

javascript
  1. 1

    RRF uses ranking positions rather than requiring dense and sparse scores to be directly comparable.

  2. 2

    Candidate depth is a quality/latency knob: too few candidates can reduce recall before fusion; too many increase work.

  3. 3

    An alternative is DBSF or a calibrated weighted score when you have evidence that score distributions are stable and comparable enough for your workload.

  4. 4

    Qdrant's Universal Query API, prefetch, and fusion interfaces are version-sensitive; verify the exact SDK syntax for the deployed client/server version.

Difficulty: 9/10
Topics: Prefetch and fusion, RRF, Hybrid query design

Scenario Questions

0-2 years experience
  1. 1

    You have dense and sparse candidate lists. Why should you fuse the rankings instead of returning whichever list is longer?

  2. 2

    Your hybrid query returns only dense-like results. What configuration would you inspect first?

2-5 years experience
  1. 1

    A hybrid search returns good results but misses rare exact matches. What candidate-generation or fusion parameters would you investigate?

  2. 2

    Why can increasing both prefetch limits improve recall while also increasing latency?

5-8 years experience
  1. 1

    Design a Qdrant hybrid query for 50 million documents with dense semantic retrieval and BM25-style sparse retrieval. How would you tune candidate depth?

  2. 2

    Your RRF result quality is good but a reranker receives too many candidates. How would you balance first-stage recall against reranking cost?

8+ years experience
  1. 1

    Design an adaptive hybrid retrieval strategy where candidate depth changes by query type or confidence while meeting a strict p95 latency target.

  2. 2

    How would you compare RRF, DBSF, and learned fusion using offline relevance judgments and online A/B testing?

Follow-up Questions

  • How would you choose the dense and sparse candidate limits before RRF fusion?
  • When would DBSF or a learned fusion method be preferable to RRF?